# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgbase=nbxmpp
pkgname=('python-nbxmpp' 'python2-nbxmpp')
pkgver=0.6.0
pkgrel=1
arch=('any')
url="https://python-nbxmpp.gajim.org/"
license=('GPL3')
makedepends=('python' 'python2')
source=(https://pypi.io/packages/source/n/nbxmpp/nbxmpp-$pkgver.tar.gz)
sha1sums=('07f0d6b2ee44da908a2001f02984abbdde9fee91')

prepare() {
  cp -r ${pkgbase}-${pkgver} ${pkgbase}-${pkgver}-python2
}

build() {
  cd ${pkgbase}-${pkgver}-python2
  python2 setup.py build
  cd ../${pkgbase}-${pkgver}
  python setup.py build
}

package_python-nbxmpp() {
  pkgdesc="A Python 3 library to use Jabber/XMPP networks in a non-blocking way"
  depends=('python')
  cd ${pkgbase}-${pkgver}
  python setup.py install --root="${pkgdir}"
}

package_python2-nbxmpp() {
  pkgdesc="A Python 2 library to use Jabber/XMPP networks in a non-blocking way"
  depends=('python2')
  cd ${pkgbase}-${pkgver}-python2
  python2 setup.py install --root="${pkgdir}"
}
